using UnityEngine;
using UnityEngine.UI;

public class IPhoneXUIAdjustements : MonoBehaviour
{
	[SerializeField]
	private CanvasScaler _canvasScaler;

	private void Start()
	{
		AdjustScalerMatch();
	}

	private void Update()
	{
		AdjustScalerMatch();
	}

	private void AdjustScalerMatch()
	{
		if (Camera.main.aspect == 2.16533327f)
		{
			_canvasScaler.matchWidthOrHeight = 1f;
		}
		else
		{
			_canvasScaler.matchWidthOrHeight = 0f;
		}
	}
}
